package com.src.myapplication.ui.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by Administrator on 2016/10/19.
 */
public class PengYouVAdapter extends FragmentPagerAdapter {
    public String[] mList;

   public List<Fragment>mdata;

    public PengYouVAdapter(FragmentManager fm, String[] titleNames, List<Fragment> data) {

        super(fm);
        this.mList=titleNames;
        this.mdata=data;
        notifyDataSetChanged();
    }

    @Override
    public Fragment getItem(int position) {
        return mdata.get(position);
    }

    @Override
    public int getCount() {
        return mdata.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mList[position];
    }
}
